@HotelSearch
@RoomDetails
Feature: Hotel Search
Description: Testing myStays.com hotel search results page
File name: happystays_hotelsearch.feature
Relative path: happystays_hotelsearch.feature
Given
I can access to myStays.com
When
I enter username and password
And
I click on Sign In button
Then
I am on Home Page
And
I enter location as "London, UK" and click on Search button
Then
I verify the hotel search results displayed
@HotelSearch
Scenario: As User, I can search Hotel and verify the search option in search results page
Given
I can access to myStays.com
When
I enter username and password
And
I click on Sign In button
Then
I am on Home Page
AssertionError: Timed out retrying after 30000ms: Expected to find element: `.location-display-container`, but never found it.
at HomePage.typeAndSelectLocation (cypress/e2e/pages/HomePage.js:49:41)
at Context.eval (cypress/e2e/common/CommonSteps.js:66:11)
at Context.resolveAndRunStepDefinition (node_modules/cypress-cucumber-preprocessor/lib/resolveStepDefinition.js:193:0)
at Context.eval (node_modules/cypress-cucumber-preprocessor/lib/createTestFromScenario.js:27:0)
Then
I verify the hotel search option in search results page
And
I verify the option to see the maximum of 6 hotel images
@HotelSearch
@RoomDetails
Scenario: As User, I can search Hotel and verify the see availability option
Given
I can access to myStays.com
When
I enter username and password
And
I click on Sign In button
Then
I am on Home Page
And
I enter location as "Paris, France" and click on Search button
Then
I verify the hotel search results displayed
SyntaxError: The following error originated from your application code, not from Cypress.
) Unexpected token '('
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.
https://on.cypress.io/uncaught-exception-from-application
And
I verify the room details displayed
Given
I can access to myStays.com
When
I enter username and password
And
I click on Sign In button
Then
I am on Home Page
AssertionError: Timed out retrying after 30000ms: Expected to find element: `.location-display-container`, but never found it.
at HomePage.typeAndSelectLocation (cypress/e2e/pages/HomePage.js:49:41)
at Context.eval (cypress/e2e/common/CommonSteps.js:66:11)
at Context.resolveAndRunStepDefinition (node_modules/cypress-cucumber-preprocessor/lib/resolveStepDefinition.js:193:0)
at Context.eval (node_modules/cypress-cucumber-preprocessor/lib/createTestFromScenario.js:27:0)
Then
I verify more than 10 hotel results are displayed
Given
I can access to myStays.com
When
I enter username and password
And
I click on Sign In button
Then
I am on Home Page
And
I enter location as "Paris" and click on Search button
Then
I verify less than 10 hotel results are displayed
Given
I can access to myStays.com
When
I enter username and password
And
I click on Sign In button
Then
I am on Home Page
And
I enter location as "London, UK"
And
I search for 3 nights
And
I click on search button
AssertionError: Timed out retrying after 30000ms: Expected to find element: `:nth-child(1) ) :nth-child(3) ) .text-sm`, but never found it.
at SearchResultsPage.displayNoOfNights (cypress/e2e/pages/SearchResultsPage.js:153:31)
at Context.eval (cypress/e2e/happystays_hotelsearch/SearchResultsSteps.js:45:16)
at Context.resolveAndRunStepDefinition (node_modules/cypress-cucumber-preprocessor/lib/resolveStepDefinition.js:193:0)
at Context.eval (node_modules/cypress-cucumber-preprocessor/lib/createTestFromScenario.js:27:0)